package cn.gzqy.zhecai.mapper;

//import java.sql.Date;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import cn.gzqy.zhecai.pojo.*;

public interface SysUserMapper {
    public int count() ;
    @Select("select * from t_sys_user")
    public List<SysUser> getUserList() ;
    public List<SysUser> getUsersByRealName(String realName) ;
    public List<SysUser> getUsersByPojo(@Param("realName") String realName, @Param("roleId") int roleId) ;
    public List<SysUser> getUserListWithRoleName(@Param("realName") String realName, @Param("roleId") int roleId) ;
    public int add(SysUser user) ;
    public int modify(SysUser user) ;
    public int updatePwd(@Param("id") int id, @Param("password") String password) ;
    public int deleteUserById(@Param("id") int id) ;
    public List<SysUser> selectList(@Param("realName")String realName, @Param("roleId")Integer roleId);
    public List<SysUser> selectListByChoose(
        @Param("realName")String realName,
        @Param("roleId")Integer roleId,
        @Param("account")String account,
        @Param("createdTime")Date createdTime
    );
    //public List<SysUser> selectListByChoose(String realName, int roleId, String account, java.util.Date createdTime);
    public List<SysUser> getUserByRoleIdArray(Integer[] roleIds);
    public List<SysUser> getUserByRoleIdList(List<Integer> roleIds);
    public List<SysUser> getUserByRoleIdMap(Map<String, Object> roleMap);
    public List<SysUser> getUserByRoleIdSet(Set<Integer> RoleIds) ;
    public List<SysUser> getPageList(
        @Param("realName")String realName,
        @Param("roleId")Integer roleId,
        @Param("pageIndex")Integer pageIndex,
        @Param("pageSize")Integer pageSize
    );
}